'use strict';

/**
 * @param {Egg.Application} app - egg application
 */
module.exports = app => {
  const { router, controller } = app;
  router.get('/', controller.index.index);
  router.post('/', controller.index.home);
  router.get('/tianqi', controller.index.tianqi);// 查询天气
  router.get('/curl', controller.index.curl);
  router.get('/curl_post', controller.index.curl_post);
  router.resources('/sort', controller.sort); // RESTful风格路由
  router.get('/details', controller.details.index);
  router.get('/details/:id', controller.details.userinfo);
  router.get('/cookie', controller.cookie.add);// 添加cookie
  router.get('/re_cookie', controller.cookie.remove);// 移除cookie
  router.get('/login', controller.login.login);// 登录获取touken
};
